<template>
   
        <div>
           <h1>test2</h1>
           <img src="../../img/bg.png">
            <button @click="goToPage">前往页面test3</button>
        </div>
    
</template>

<script>

export default {
    name:'test2',
    props:{
        componentParam:{
            type:Object,
            default:()=>{}
        },
    },
    components:{
     
    },
    mixins:[],
    data(){
        return{
           
        }
    },
    created(){
       console.log(this.componentParam)
    },
    methods:{
        
        goToPage(){
            this.$emit('changePage', {
                name: 'test3',
                componentParam:  {a:"test2"} 
            })
        }
        
        
    },
    
}

</script>

<style scoped>
 
</style>